package com.csxy.six.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 公告实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(name="Announcement", description="公告信息")
public class Announcement implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "公告ID")
    @TableId(value = "announce_id", type = IdType.AUTO)
    private Integer announceId;

    @Schema(description = "公告标题")
    private String title;

    @Schema(description = "公告内容")
    private String content;

    @Schema(description = "分类ID")
    private Integer categoryId;

    @Schema(description = "是否置顶（0-否，1-是）")
    private Boolean isTop;

    @Schema(description = "发布时间")
    private Date publishTime;

    @Schema(description = "定时发布时间（为空表示立即发布）")
    private Date scheduledTime;

    @Schema(description = "作者ID")
    private Integer authorId;

    @Schema(description = "是否已发布（0-草稿，1-已发布）")
    private Boolean isPublished;

}